<h1>购物车列表</h1>

<table>
  <thead>
  <tr>
    <th colspan="3"></th>
  </tr>
  </thead>

  <tbody>
  <% @carts.each do |cart| %>
      <tr>
        <td><%= link_to '显示购物车信息', cart %></td>
        <td><%= link_to '修改购物车信息', edit_cart_path(cart) %></td>
        <td><%= link_to '删除购物车', cart, method: :delete, data: {confirm: 'Are you sure?'} %></td>
      </tr>

  <% end %>
  </tbody>
</table>

<br>

<%= link_to '添加购物车', new_cart_path %>
